package top.dark.design.patterns.factory.factorymethod;

/**
 * Author: Darkn
 * description:
 * Create Time: 2021/4/24 21:28
 */
public class BJOrderPizza extends OrderPizza {
    @Override
    public Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if (orderType.equals("Greek")) {
            pizza = new BJGreePizza();
            pizza.setName("北京希腊披萨");
        } else if (orderType.equals("Chesse")) {
            pizza = new BJChessePizza();
            pizza.setName("北京芝士披萨");
        }
        return pizza;
    }
}
